package BasicClass.One;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BasicOne2 {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int size = Integer.parseInt(reader.readLine());
        String[] nums = reader.readLine().split(" ");
        int[] arr = new int[size];
        for (int i = 0; i < size; i++) {
            arr[i]=Integer.parseInt(nums[i]);
        }
        BasicOne2 one1 = new BasicOne2();
        one1.Main(arr);
    }

    /**
     * 冒泡排序
     * @throws IOException
     */
    public void Main(int[] arr) {
        int max;
        int index;
        for (int i = arr.length-1; i >= 0; i--) {
            max = arr[i];
            index = i;
            for (int j = 0; j < i; j++) {
                if(arr[j]>max){
                    max = arr[j];
                    index = j;
                }
            }
            arr[index] = arr[i];
            arr[i] = max;
        }
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < arr.length; i++) {
            builder.append(arr[i]+" ");
        }
        System.out.println(builder);
    }
}
